﻿using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;
using Verse.AI;
namespace Miao.Stand
{
    public class JobGiver_StandFollowMaster : ThinkNode_JobGiver
    {
        //protected IntRange ticksBetweenWandersRange = new IntRange(100, 100);


        public override ThinkNode DeepCopy(bool resolve = true)
        {
            return (JobGiver_StandFollowMaster)base.DeepCopy(resolve);
        }
        //StarPlatinum在10Ticks内开始了10项工作。
        //没准这个的调用必须要等玩家没有工作了才行
        protected override Job TryGiveJob(Pawn pawn)//还是要更改这个，否则无法实现等待功能
        {
            StandPawn stand_Pawn = pawn as StandPawn;
            if (stand_Pawn != null)//可能是返回值不设为其他，那就不能使用新的MakeJob
            {
                //所以要设一下expiryInterval有效期
                Messages.Message("重新获取工作", MessageTypeDefOf.NeutralEvent);


                return JobMaker.MakeJob(StandJobDefOf.FollowMaster, stand_Pawn.owner);
            }

            return null;
        }

    }
}


